home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGMISC
/
FORTRAN1.LZH
/
DELETE.FOR
< prev
next >
Wrap
Text File
|
1988-02-08
|
2KB
|
85 lines
SUBROUTINE DELETE ( FNAME, ERROR )
C*
C* *******************************
C* *******************************
C* ** **
C* ** DELETE **
C* ** **
C* *******************************
C* *******************************
C*
C* SUBPROGRAM :
C* DELETE FILE
C*
C* AUTHOR :
C* ART RAGOSTA
C* MS 207-5
C* AMES RESEARCH CENTER
C* MOFFETT FIELD, CA 94035
C* (415) 694-5578
C*
C* PURPOSE :
C* DELETE A FILE FROM THE DEFAULT OR SPECIFIED DIRECTORY.
C*
C* METHODOLOGY :
C* USES THE NON-TRANSPORTABLE DEC 'DELETE' EXTENSION TO THE
C* CLOSE STATEMENT.
C*
C* INPUT ARGUMENTS :
C* FNAME - THE NAME OF THE FILE TO BE DELETED.
C*
C* OUTPUT ARGUMENTS :
C* ERROR - SET TRUE IF AN ERROR OCCURRED (EG, THE FILE DOESN'T
C* EXIST).
C*
C* INTERNAL WORK AREAS :
C* NONE
C*
C* COMMON BLOCKS :
C* NONE
C*
C* FILE REFERENCES :
C* 0 - DUMMY UNIT REQUIRED BY OPEN AND CLOSE STATEMENTS.
C*
C* DATA BASE ACCESS :
C* NONE
C*
C* SUBPROGRAM REFERENCES :
C* NONE
C*
C* ERROR PROCESSING :
C* ERR= IS CHECKED ON OPEN AND CLOSE STATEMENTS.
C*
C* TRANSPORTABILITY LIMITATIONS :
C* THE "DELETE" STATUS OPTION OF THE CLOSE STATEMENT IS NON-ANSI
C* STANDARD.
C*
C* ASSUMPTIONS AND RESTRICTIONS :
C* NONE
C*
C* LANGUAGE AND COMPILER :
C* ANSI FORTRAN 77
C*
C* VERSION AND DATE :
C* VERSION I.0 31-AUG-84
C*
C* CHANGE HISTORY :
C* 31-AUG-84 INITIAL VERSION
C*
C***********************************************************************
C*
CHARACTER *(*) FNAME
LOGICAL ERROR
C
OPEN (UNIT=0,FILE=FNAME,STATUS='OLD',ERR=1000)
CLOSE (UNIT=0,STATUS='DELETE',ERR=1000)
ERROR = .FALSE.
RETURN
C
1000 ERROR = .TRUE.
RETURN
END
C
C---END DELETE
C